﻿using System.ComponentModel.DataAnnotations;

namespace Model.DTO.Article
{
    /// <summary>
    /// 添加文章DTO
    /// </summary>
    public class AddArticleDTO
    {
        /// <summary>
        /// 标题(32)
        /// </summary>
        [Required, MaxLength(32,ErrorMessage = "标题长度不能超过32")]
        public string Title { get; set; }
        /// <summary>
        /// 内容(131072=>2^17)
        /// </summary>
        [Required, MaxLength(131072,ErrorMessage = "内容长度不能超过131072")]
        public string Content { get; set; }
        /// <summary>
        /// 用户Id
        /// </summary>
        [Required]
        public int UserId { get; set; }
        /// <summary>
        /// 文章类型Ids
        /// </summary>
        [Required]
        public List<int> ArticleTypeIds { get; set; }
        /// <summary>
        /// 备注(128)
        /// </summary>
        [MaxLength(128,ErrorMessage = "备注长度不能超过128")]
        public string? Remark { get; set; }
    }
}
